import urllib

from bs4 import BeautifulSoup

stock_list = [
    '005930', '005380', '005490', '012330',
    '000660', '035420', '005935', '015760',
    '055550', '032830', '051910', '009540',
    '017670', '105560', '096770', '023530',
    '086790', '000810', '066570', '003550',
    '053000', '033780', '000830', '034220',
    '003600', '010140', '086280', '051900',
    '010950', '030200', '011170', '161390',
    '139480', '004020', '006400', '042660',
    '000720', '024110', '035250', '034730',
    '036460', '088350', '010130', '090430',
    '001800', '036570', '009150', '078930'
]

def parsing_stocks(item):
    url = "http://stock.daum.net/item/main.daum?code=" + item
    soup = BeautifulSoup( urllib.urlopen( url ).read() )
    return soup.find("ul", "list_stockrate").contents[1].contents[0].encode_contents()

#haha 
